package effective_java;

import java.util.concurrent.ConcurrentHashMap;

public class StaticFactory {
	
	public static void main(String[] args) {
		Cat catline = Cat.getInstance();
		Cat catty = Cat.getInstance();
		System.out.println(catline == catty);
		ConcurrentHashMap m = null;
	}
}
class Cat extends Object{
	private String name;
	private static final Cat cat = new Cat();
	private Cat(){
		name = "cat";
	}
	public static Cat getInstance(){
		return cat;
	}
}